home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -in_the_mag- / reader_requests / wild / developer / docs / wild.doc
Text File  |  2000-02-23  |  7KB  |  170 lines

  1. TABLE OF CONTENTS
  2.  
  3. wild.library/AddWildApp
  4. wild.library/AddWildThread
  5. wild.library/AllocVecPooled
  6. wild.library/BuildWildObject
  7. wild.library/DisplayFrame
  8. wild.library/FindWildApp
  9. wild.library/FreeVecPooled
  10. wild.library/FreeWildObject
  11. wild.library/GetWildAppTags
  12. wild.library/LoadExtension
  13. wild.library/LoadFile
  14. wild.library/LoadModule
  15. wild.library/LoadTable
  16. wild.library/LoadWildObject
  17. wild.library/InitFrame
  18. wild.library/KillExtension
  19. wild.library/KillModule
  20. wild.library/KillTable
  21. wild.library/RealyzeFrame
  22. wild.library/RemWildApp
  23. wild.library/RemWildThread
  24. wild.library/SetWildAppTags
  25.         
  26.         NAME
  27.                 AddWildApp
  28.         
  29.         SYNOPSIS
  30.                 wildapp = AddWildApp(WildPort,TagList);
  31.                 D0                      A0      A1
  32.                 
  33.                 struct WildApp *AddWildApp(struct MSGPort *,struct TagItem *);
  34.                 
  35.         FUNCTION
  36.                 Allocates a WildApp struct, and initializes it with the provided
  37.                 tags. Not specified tags are set to wild's default. SetWildAppTags
  38.                 is called by this function.
  39.                 
  40.         INPUTS
  41.                 WildPort - A STD exec MSGPort, used to comunicate with wild.
  42.                 TagList  - taglist to initialize the app.
  43.                 
  44.         RESULT
  45.                 WildApp  - a WildApp struct, used for everything in Wild.
  46.  
  47.         SEE ALSO
  48.                 RemWildApp,SetWildAppTags
  49.  
  50.                 
  51.         NAME
  52.                 AddWildThread
  53.                         
  54.         SYNOPSIS
  55.                 wildthread=     AddWildThread(WildApp,TagList)
  56.                 D0                              A0      A1
  57.  
  58.                 struct  WildThread      *AddWildThread(struct WildApp *,struct TagItem *);
  59.                 
  60.         FUNCTION
  61.                 Allocated a WildThread struct and starts the new thread.
  62.                 Note: Your thread doesn't need to preserve any regs, or to
  63.                 manage any Process Flag (those boring PRF_FreeCli,FreeOutput,Free??)
  64.                 because Wild manages them for you. The WildThread structure is
  65.                 given to the Thread as input in the A0 register: read there your
  66.                 Args (specified with WITH_Args tag.)
  67.                 
  68.         INPUTS
  69.                 WildApp - A WildApp structure.
  70.                 TagList - A TagList to init the Thread.         
  71.         RESULT
  72.                 WildThread - A WildThread structure.
  73.  
  74.         SEE ALSO
  75.                 RemWildThread
  76.  
  77.  
  78.         NAME
  79.                 BuildWildObject
  80.                 
  81.         SYNOPSIS
  82.                 object= BuildWildObject(tags)
  83.                 D0                      A0
  84.  
  85.                 ULONG   *BuildWildObject(struct TagItem *tags);
  86.                 
  87.         FUNCTION
  88.                 That's a powerful function to create anything in the Scene.
  89.                 It's quite low-level, is mainly used by the Loader modules when
  90.                 loading a scene-file. 
  91.                 You can use this func to create new objects or to modify existing.
  92.                 See tags description.
  93.                 
  94.                 WIBU_ObjectType :(REQUIRED) The type of object to create/modify.
  95.                 One of those OBJECT_???.
  96.                 WIBU_BuildObject:If you want to create a NEW object, set this to true;
  97.                 You MUST also give the WIBU_WildApp tag, when creating new things,
  98.                 because wild needs to have memory from your pool.
  99.                 WIBU_WildApp    :Pass your WildApp here, NEEDED when creating 
  100.                 NEW objects.
  101.                 WIBU_ModifyObject: If you want to modify an existing object, pass it
  102.                 here. Obviously, you CAN'T specify that with WIBU_BuildObject !!!
  103.                 
  104.                 Then, you can specify ATTRS and FRIENDS, but not CHILDS. Those are used
  105.                 to code Loader modules.
  106.  
  107.         INPUTS
  108.                 tags = A taglist defining the properties of the object to build or modify.
  109.                 
  110.         RESULT
  111.                 object = The modified or builded object.
  112.  
  113.         SEE ALSO
  114.                 FreeWildObject(),LoadWildObject(),objects.h
  115.  
  116.         NAME
  117.  
  118.                 LoadWildObject
  119.  
  120.         SYNOPSIS
  121.                 object= LoadWildObject(wildapp,tags)
  122.                 D0                      A0      A1
  123.  
  124.                 ULONG   *BuildWildObject(struct WildApp *wapp,struct TagItem *tags);
  125.  
  126.         FUNCTION
  127.                 Loads an object from a filehandle, or using a readhook.
  128.                 Note that the specified file (or filehandle, or readhook)
  129.                 must contain the object you specified, not anything else.
  130.                 Usually, you should load a Level, or a Scene, but you can
  131.                 also load Textures, or Aliens, or even Faces (but these are
  132.                 untested).
  133.  
  134.                 You can specify those tags:
  135.                 WILO_ObjectType :(REQUIDED) The type of object (OBJECT_???) to load.
  136.                 WILO_FileName   : The filename to load. If you specify that, the file
  137.                 will be loaded using dos.library. (in the future, also XPK support,
  138.                 but not now).
  139.                 WILO_FileHandle : Alternative, you can specify a filehandle of an already
  140.                 open file. The file will be readed from the current position, no Seek(0)
  141.                 will be performed. This allows you to read files step by step.
  142.                 WILO_ReadHook   : Another alternative, you can specify a hook to be called
  143.                 to read from anywhere: you can fake and read from mem, or using trackdisk,
  144.                 or anything else. Hook convention: A0:Hook A1:Buffer to fill A2:Len to read.
  145.                 Your hook should contain something like a file handle in the h_Data.
  146.                 WILO_LoadedAttrsFirst : Says to use first the attrs found in the file, and
  147.                 then, use yours attrs to fill the ones not present in the file. If you
  148.                 specify FALSE this, wild will first use your attrs and then fill the
  149.                 more needed with the ones loaded from the file.
  150.  
  151.                 Then, add more ATTRS and FRIENDS, used as you specified.
  152.                 Note that those will affect only the object you load, but not any other
  153.                 child: if you load a scene, you cannot modify the world, the arenas, the
  154.                 aliens loeded with it. You can only modify the scene.
  155.  
  156.                 Note that the object you have is made by BuildWildObject, so you
  157.                 can free it with FreeWildObject(); but remember: FreeWildObject won't
  158.                 free the object's childs.
  159.  
  160.         INPUTS
  161.                 wildapp = your WildApp.
  162.                 tags = taglist defining the file and the attrs of the object to load.
  163.  
  164.         RESULT
  165.                 object = a wildobject, or NULL if no object can be loaded.
  166.  
  167.         SEE ALSO
  168.                 BuildWildObject(),FreeWildObject(),objects.h
  169.  
  170.